package command

import (
	"algo-sdk-go/project/matchmaking/common/constant"
	"algo-sdk-go/project/matchmaking/domain/models/entity"
	"algo-sdk-go/project/matchmaking/domain/models/valueobject"
	"algo-sdk-go/project/matchmaking/domain/port/repo/ops"
)

// -------- 相亲期望
type MatePreferenceCommand struct {
	UserNum   int    // 用户编号
	Standards string //

	HeightRange    ops.HeightRange    // 身高要求： 最低身高, 单位: cm
	WeightRange    ops.WeightRange    // 体重要求： 最高体重, 单位: 斤
	AgeRange       ops.AgeRange       // 年龄要求： 年龄范围, 单位: 岁
	IncomeRange    ops.IncomeRange    // 收入要求： 最低收入, 单位：万元
	EducationRange ops.EducationRange // 学历要求： 最低学历

	OccupationPreference       []constant.Occupation // 职业要求
	HometownPreference         []valueobject.Address // 籍贯要求
	CurrentResidencePreference []valueobject.Address // 工作地要求
	PersonalityTraits          []string              // 个性特征
	OtherRequired              []string              // 其他特征

	CreateUser string `json:"createUser"` // 创建者
	ModifyUser string `json:"modifyUser"` // 修改者
}

func (c *MatePreferenceCommand) TransMatePreference() *entity.MatePreference {
	return &entity.MatePreference{
		UserNum:                    c.UserNum,
		Standards:                  c.Standards,
		Gender:                     "",
		HeightRange:                c.HeightRange,
		WeightRange:                c.WeightRange,
		AgeRange:                   c.AgeRange,
		IncomeRange:                c.IncomeRange,
		EducationRange:             c.EducationRange,
		OccupationPreference:       c.OccupationPreference,
		HometownPreference:         c.HometownPreference,
		CurrentResidencePreference: c.CurrentResidencePreference,
		PersonalityTraits:          c.PersonalityTraits,
		OtherRequired:              c.OtherRequired,
		CreateUser:                 c.CreateUser,
		ModifyUser:                 c.ModifyUser,
	}
}
